<div class="row">
    <div class="col-md-12 col-sm-12 col-xs-12">
        <div class="x_panel">
            <div class="x_title">
                <h2>管理员管理<small>列表</small></h2>
                <div class="clearfix"></div>
            </div>
            <div class="row-fluid">
                <form action="" method="get">
                 <a class="btn btn-success" href="{eval U(['admin/add','menu_id'=>'admin/index'])}"> 添加管理员</a>
                </form>
             </div>
            <div class="x_content" style="display: block;">
                <table class="table">
                    <thead>
                    <tr>
                        <th width="5%">#</th>
                        <th width="15%">账号</th>
                        <th width="10%">角色</th>
                        <th width="">最后登录时间</th>
                        <th width="10%">状态</th>
                        <th width="">创建日期</th>
                        <th width="30%">操作</th>
                    </tr>
                    </thead>
                    <tbody>
                   {foreach $data.admin.list $val $key}
                    <tr>
                        <td scope="row">{$val.id}</td>
                        <td>{$val.username}</td>
                        <td>{$val.roles}</td>
                        <td>{$val.last_login}</td>
                        <td>{if $val.status==1}<span class="text-success btn btn-success btn-xs">启用</span>{else}<span class="text-danger btn btn-danger btn-xs">禁用</span>{/if}</td>
                        <td>{$val.create_date}</td>
                        <td>
                           <div class="x_content">
                              <a class="btn btn-primary btn-xs" href="{eval U(['admin/edit','menu_id'=>'role/index','id'=>$val.id])}"> 编辑</a>
                              <button class="btn btn-danger btn-xs" data-toggle="dropdown">删除
                                <i class="icon-angle-down"></i></button>
                                <ul class="dropdown-menu">
                                    <li><a href="{eval U(['admin/delete','menu_id'=>'admin/index','id'=>$val.id])}">确定</a></li>
                                    <li><a href="javascript:;">取消</a></li>
                                </ul>
                           </div>
                        </td>
                    </tr>
                    {/foreach}
                    </tbody>
                </table>
            </div>
            {Yii::$app->view->render('/com/pager.php',['pager'=>$data['admin']['pager']])}
        </div>
    </div>

</div>